/**
 * @author Goh Zhe Yi (A0050823)
 */
package sg.edu.nus.iss.team4ft.ui;

import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.WindowConstants;

import sg.edu.nus.iss.team4ft.manager.BillManager;
import sg.edu.nus.iss.team4ft.service.Bill;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class BillReportJFrame extends javax.swing.JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private BillManager billManager;
	private JTextPane jTextPaneBillReportPg1;
	private JTextPane jTextPaneBillReportPg2;
	private JPanel jPanelBillReport;
	private JScrollPane jScrollPaneBillReport;
	private JPanel jPanelSeperator;
	private Bill bill;

		
	public BillReportJFrame(Bill bill) {
		super();
		billManager = new BillManager();
		this.bill = bill;	
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jScrollPaneBillReport = new JScrollPane();
				getContentPane().add(jScrollPaneBillReport);
				jScrollPaneBillReport.setBounds(0, 0, 887, 600);
				jScrollPaneBillReport.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
				jScrollPaneBillReport.getVerticalScrollBar().setSize(15, 2500);
				{
					jPanelBillReport = new JPanel();			
					jScrollPaneBillReport.setViewportView(jPanelBillReport);
					BoxLayout jPanel1Layout = new BoxLayout(jPanelBillReport, javax.swing.BoxLayout.Y_AXIS);
					jPanelBillReport.setBounds(1, 1, 884, 1500);
					jPanelBillReport.setLayout(jPanel1Layout);
					jPanelBillReport.setPreferredSize(new java.awt.Dimension(869, 1300));
					jPanelBillReport.setSize(1200, 2000);
					jPanelBillReport.setAutoscrolls(true);
					{
						jTextPaneBillReportPg1 = new JTextPane();
						jPanelBillReport.add(jTextPaneBillReportPg1);
						String bill = billManager.getBillPg1Str(this.bill);
						jTextPaneBillReportPg1.setText(bill);
						jTextPaneBillReportPg1.setEditable(false);
						jTextPaneBillReportPg1.setFont(new java.awt.Font("Lucida Console",0,10));
						jTextPaneBillReportPg1.setAutoscrolls(false);
						jTextPaneBillReportPg1.setPreferredSize(new java.awt.Dimension(869, 300));
					}
					{
						jPanelSeperator = new JPanel();
						jPanelBillReport.add(jPanelSeperator);
					}
					{
						jTextPaneBillReportPg2 = new JTextPane();
						jPanelBillReport.add(jTextPaneBillReportPg2);
						String bill = billManager.getBillPg2Str(this.bill);
						jTextPaneBillReportPg2.setText(bill);
						jTextPaneBillReportPg2.setFont(new java.awt.Font("Lucida Console",0,10));
						jTextPaneBillReportPg2.setBounds(12, 130, 711, 700);
						jTextPaneBillReportPg2.setPreferredSize(new java.awt.Dimension(1000, 700));
						jTextPaneBillReportPg2.setSize(1200, 2000);
						jTextPaneBillReportPg2.setBackground(new java.awt.Color(255,255,255));
						jTextPaneBillReportPg2.setEditable(false);
						jTextPaneBillReportPg2.setAutoscrolls(true);
					}
				}
			}

			pack();
			this.setSize(903, 695);
		} catch (Exception e) {
			e.printStackTrace();
			
		}
	}	

}
